﻿using Mozi.HttpEmbedded.Generic;

namespace Mozi.Live.SDP
{
    /// <summary>
    /// SDP属性合集
    /// </summary>
    public class SDPAttributeType : AbsClassEnum
    {
        /// <summary>
        /// 会话类别 [session]
        /// </summary>
        public static SDPAttributeType Category = new SDPAttributeType("cat");
        /// <summary>
        /// 会话关键字 [session]
        /// </summary>
        public static SDPAttributeType Keywords = new SDPAttributeType("keywds");
        /// <summary>
        /// 创建会话的工具 [session]
        /// </summary>
        public static SDPAttributeType Tool = new SDPAttributeType("tool");
        /// <summary>
        /// 资源的时长,ms [session]
        /// </summary>
        public static SDPAttributeType PacketTime = new SDPAttributeType("ptime");
        /// <summary>
        /// 数据包中装载的最大媒体时长 [media]
        /// </summary>
        public static SDPAttributeType MaxPacketTime = new SDPAttributeType("maxptime");
        /// <summary>
        /// 媒体摘要信息<see cref="RtpMap"/> [media]
        /// </summary>
        public static SDPAttributeType RtpMap = new SDPAttributeType("rtpmap");
        /// <summary>
        /// 媒体指向 [session,media]
        /// </summary>
        public static SDPAttributeType MediaDirection = new SDPAttributeType("");
        /// <summary>
        /// 媒体画面的方向 [media]
        /// </summary>
        public static SDPAttributeType Orientation = new SDPAttributeType("orient");
        /// <summary>
        /// 会话类型 [session]
        /// </summary>
        public static SDPAttributeType ConferenceType = new SDPAttributeType("type");
        /// <summary>
        /// 字符集 [session]
        /// </summary>
        public static SDPAttributeType CharacterSet = new SDPAttributeType("charset");
        /// <summary>
        /// 语言 [session, media]
        /// </summary>
        public static SDPAttributeType SDPLanguage = new SDPAttributeType("sdplang");
        /// <summary>
        /// 语言 [session, media]
        /// </summary>
        public static SDPAttributeType Language = new SDPAttributeType("lang");
        /// <summary>
        /// 帧率 [media]
        /// </summary>
        public static SDPAttributeType FrameRate = new SDPAttributeType("framerate");
        /// <summary>
        /// 质量 [media]
        /// </summary>
        public static SDPAttributeType Quality = new SDPAttributeType("quality");
        /// <summary>
        /// 格式参数 [media]
        /// </summary>
        public static SDPAttributeType FormatParameters = new SDPAttributeType("fmtp");
        /// <summary>
        /// 流地址
        /// </summary>
        public static SDPAttributeType Control = new SDPAttributeType("control");

        private string _name;
        /// <summary>
        /// 属性名
        /// </summary>
        public string Name { get => _name; set => _name = value; }

        public SDPAttributeType(string name)
        {
            _name = name;
        }
        public override string ToString()
        {
            return _name;
        }
        protected override string Tag => _name;
    }

}
